CLIENT_DIR=./osd_client
SERVER_DIR=./osd_server
VER=0.1.1

all: $(CLIENT_DIR)/Makefile $(SERVER_DIR)/Makefile
	make -C $(CLIENT_DIR)
	make -C $(SERVER_DIR)

.PHONY: clean
clean: $(CLIENT_DIR)/Makefile $(SERVER_DIR)/Makefile
	make -C $(CLIENT_DIR) clean
	make -C $(SERVER_DIR) clean
	rm -f osd-slider-*.tar.bz2

.PHONY: install
install: $(CLIENT_DIR)/Makefile $(SERVER_DIR)/Makefile
	make -C $(CLIENT_DIR) install
	make -C $(SERVER_DIR) install

.PHONY: uninstall
uninstall: $(CLIENT_DIR)/Makefile $(SERVER_DIR)/Makefile
	make -C $(CLIENT_DIR) uninstall
	make -C $(SERVER_DIR) uninstall

.PHONY: dist
dist: clean
	tar cf osd-slider-$(VER).tar $(CLIENT_DIR) $(SERVER_DIR)
	bzip2 -9 osd-slider-$(VER).tar

